<?xml version="1.0" encoding="UTF-8"?>
<handler name="Blog">
	<results>
		<!-- blogX error results -->
		<result value="error_admin"  type="page" sect="errors" sub="blogX" proc="error" page="admin">user is not a blogspace administrator</result>
		<result value="error_blogx"  type="page" sect="errors" sub="blogX" proc="error" page="general">general</result>
		<result value="error_delete"  type="page" sect="errors" sub="blogX" proc="error" page="admin">cannot delete blogspace admin</result>
		<result value="error_confirm"  type="page" sect="errors" sub="blogX" proc="error" page="confirm">new password is not confirmed</result>
		<result value="error_duplicate" type="page" sect="errors" sub="blogX" proc="error" page="duplicate">blogspace with this name exists</result>
		<result value="error_exists"  type="page" sect="errors" sub="blogX" proc="error" page="exist">user with this name exists</result>
		<result value="error_spaceexist"  type="page" sect="errors" sub="blogX" proc="error" page="exists">blogspace does not exist</result>
		<result value="error_userexist"  type="page" sect="errors" sub="blogX" proc="error" page="exists">user does not exist</result>
		<result value="error_expired"  type="page" sect="errors" sub="blogX" proc="error" page="expired">token expired</result>
		<result value="error_group"  type="page" sect="errors" sub="blogX" proc="error" page="group">unknown rights group</result>
		<result value="error_inactive" type="page" sect="errors" sub="blogX" proc="error" page="inactive">blogspace is not active</result>
		<result value="error_loadblog" type="page" sect="errors" sub="blogX" proc="error" page="loadblog">blog not loaded</result>
		<result value="error_loadspace" type="page" sect="errors" sub="blogX" proc="error" page="loadspace">blogspace not loaded</result>
		<result value="error_notexist" type="page" sect="errors" sub="blogX" proc="error" page="notexist">user with this name does not exist</result>
		<result value="error_notoken"  type="page" sect="errors" sub="blogX" proc="error" page="notoken">user is not logged on</result>
		<result value="error_password" type="page" sect="errors" sub="blogX" proc="error" page="password">incorrect password</result>
		<result value="error_right"  type="page" sect="errors" sub="blogX" proc="error" page="right">access denied</result>
		<result value="error_valid"  type="page" sect="errors" sub="blogX" proc="error" page="valid">token not valid</result>
		<result value="notOK"  type="page" sect="errors" sub="blogX" proc="error" page="general">general</result>
	</results>
	<process name="GetBlogspaceList" updateprofile="yes">
		<call type="soap" fields="no" operation="ListSpaces">
			<parameter name="token" type="token"/>
		</call>
		<results file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0" function="getBlogspaceListXml">
			<result value="0" type="contentxml" sect="site" sub="admin" proc="blogspace" page="list">OK</result>
		</results>
	</process>
	<process name="Add" updateprofile="yes">
		<call type="soap" fields="no" operation="AddSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">SpaceName</parameter>
			<parameter name="type" type="profile">SpaceType</parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="text" type="profile">Text</parameter>
			<parameter name="admin" type="profile">Username</parameter>
			<parameter name="wanttopics" type="value">yes</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="process">GetBlogspaceList</result>
		</results>
	</process>
	<process name="Delete" updateprofile="yes">
		<call type="soap" fields="no" operation="RemoveSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">SpaceName</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="process">GetBlogspaceList</result>
		</results>
	</process>
	<process name="Edit" updateprofile="yes">
		<call type="soap" fields="no" operation="EditSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">SpaceName</parameter>
			<parameter name="type" type="profile">SpaceType</parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="text" type="profile">Text</parameter>
			<parameter name="wanttopics" type="value">yes</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="process">GetBlogspaceList</result>
		</results>
	</process>
	<process name="GetBlogspace" updateprofile="no">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="details"  page="edit">OK</result>
		</results>
	</process>
	<process name="SetBlogspace" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="query">id</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="site" sub="admin" proc="spaces"  page="edit">OK</result>
		</results>
	</process>
	<process name="GetBlogspaceArch" updateprofile="no">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="details" page="archive">OK</result>
		</results>
	</process>
	<process name="GetBlogspaceImage" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpaceBlog">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="details" page="image">OK</result>
			<result value="error_blogexist" type="page" sect="blogs" sub="blogspace" proc="details" page="image">OK</result>
		</results>
	</process>
	<process name="GetBlogspaceDel" updateprofile="no">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="query">id</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="site" sub="admin" proc="spaces"  page="delete">OK</result>
		</results>
	</process>
	<process name="GetBlogspaceEdit" updateprofile="no">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="query">id</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="site" sub="admin" proc="spaces"  page="edit">OK</result>
		</results>
	</process>
	<process name="GetBlogspaceView" updateprofile="no">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="query">id</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="site" sub="admin" proc="spaces"  page="view">OK</result>
		</results>
	</process>
	<!-- Get/Add blogspace blog -->
	<process name="GetBlogspaceBlog" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpaceBlog">
			<parameter name="token" type="token"/>
			<parameter name="name" type="query">id</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="site" sub="admin" proc="spaces"  page="image">OK</result>
			<result value="error_blogexist" type="page" sect="site" sub="admin" proc="spaces" page="image">OK</result>
		</results>
	</process>
	<process name="AddBlogspaceBlog" updateprofile="yes">
		<call type="soap" fields="no" operation="AddSpaceBlog">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">id</parameter>
			<parameter name="author" type="value"></parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="image" type="file">ImageFile</parameter>
			<parameter name="html" type="profile">Text</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">GetBlogspaceList</result>
		</results>
	</process>
	<!-- Edit archive setting -->
	<process name="ChangeArchive" updateprofile="yes">
		<call type="soap" fields="no" operation="ChangeArchive">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="type" type="profile">ArchiveType</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="details" page="archive_ok">OK</result>
		</results>
	</process>
	<!-- Upload image to blogspace -->
	<process name="AddBlogspaceImage" updateprofile="yes">
		<call type="soap" fields="no" operation="AddSpaceImage">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">id</parameter>
			<parameter name="filename" type="file">ImageName</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">GetBlogspaceList</result>
		</results>
	</process>
	<process name="AddSpaceImage" updateprofile="yes">
		<call type="soap" fields="no" operation="AddSpaceImage">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="filename" type="file">ImageName</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="details" page="image_ok">OK</result>
		</results>
	</process>
	<!-- Update (edit + addblog) to blogspace -->
	<process name="UpdateSpace" updateprofile="yes">
		<call type="soap" fields="no" operation="UpdateSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">SpaceName</parameter>
			<parameter name="type" type="profile">SpaceType</parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="text" type="profile">Text</parameter>
			<parameter name="author" type="value"></parameter>
			<parameter name="image" type="profile">ImageName</parameter>
			<parameter name="blogtitle" type="profile">BlogTitle</parameter>
			<parameter name="bloghtml" type="profile">BlogText</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="page" sect="site" sub="admin" proc="spaces" page="edit_ok">OK</result>
		</results>
	</process>
	<!-- Send newsletter to subscribers -->
	<process name="UploadNews" updateprofile="yes">
		<call type="soap" fields="no" operation="UploadNewsletter">
			<parameter name="token" type="token"/>
			<parameter name="subject" type="profile">Subject</parameter>
			<parameter name="message" type="profile">Message</parameter>
			<parameter name="filename" type="file">Attatchment</parameter>
			<parameter name="group" type="value">public</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="process">SendNews</result>
		</results>
	</process>
	<process name="SendNews" updateprofile="yes">
		<call type="soap" fields="no" operation="SendNewsletter">
			<parameter name="token" type="token"/>
			<parameter name="subject" type="profile">Subject</parameter>
			<parameter name="message" type="profile">Message</parameter>
			<parameter name="filename" type="file">Attatchment</parameter>
			<parameter name="group" type="value">public</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="details" page="newsletter_ok">OK</result>
		</results>
	</process>
</handler>